import { _decorator, Component, Node, Label, UIOpacity } from 'cc';
import { Global } from './Global';
const { ccclass, property } = _decorator;

@ccclass('SwitchManage')
export class SwitchManage extends Component {

    @property(Label)
    floor: Label = null

    start() {
        Global.sm = this
    }

    update(deltaTime: number) {

    }

    show(floor: number) {
        console.log('第' + floor + '层')
        this.floor.string = '第' + floor + '层'
        this.node.getComponent(UIOpacity).opacity = 255
        this.node.active = true
        setTimeout(() => {
            this.node.active = false
        }, 1000)
    }
}

